﻿using FreeSql;
using Simple.Contracts.Models.Common;
using Simple.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Services
{
    public class BaseService
    {
        public readonly IFreeSql _simpleFreeSql;
        public readonly FreeSqlCloud _freeSqlCloud;
        public readonly CurrentAccount _currentAccount;

        /// <summary>
        /// 依赖注入
        /// </summary>
        /// <param name="freeSqlCloud"></param>
        public BaseService(FreeSqlCloud freeSqlCloud, CurrentAccount currentAccount)
        {
            _freeSqlCloud = freeSqlCloud;
            _simpleFreeSql = freeSqlCloud.Use(DbEnum.Simple);
            _currentAccount = currentAccount;
        }
    }
}
